import Vue from 'vue'
// import Vuex from 'vuex'
import Router from 'vue-router'
import GoodsList from './../views/GoodsList'
import Cart from './../views/Cart'
import Address from './../views/Address'
import OrderConfirm from './../views/OrderConfirm'
import OrderSuccess from './../views/OrderSuccess'

Vue.use(Router);

// Vue.use(Vuex);

export default new Router({
  mode: 'hash', // hash '#' / history
  routes: [
    {
      path: '/',
      name: 'GoodsList',
      components: {
        default: GoodsList,
      },
    },
    {
      path: '/cart',
      name: 'Cart',
      components: {
        default: Cart
      }
    },
    {
      path: '/address',
      name: 'Address',
      component: Address
    },
    {
      path: '/orderConfirm',
      name: 'OrderConfirm',
      component: OrderConfirm
    },
    {
      path: '/orderSuccess',
      name: 'OrderSuccess',
      component: OrderSuccess
    },
  ]
})
